
var app = getApp()
Page({
  data: {
    
  },
  onLoad: function (e) {
    var that = this;
    that.setData({
      orderId: e.orderid
    })
    console.log(that.data.orderId);
    that.requestCardDetail();
  },
  // 请求会员卡详情
  requestCardDetail: function () {
    var that = this;
    var orderid = that.data.orderId;
    app.setVersion(that);
    wx.showLoading({
      title: '加载中',
    })
    wx.request({
      url: app.globalData.requestUrl,
      data: {
        map: 'applet_card_order_details',
        tid: orderid
      },
      success: function (res) {
        console.log(res.data);
        if (res.data.ec == 200) {
          that.setData({
            orderDetail: res.data.data
          })
          console.log(that.data.orderDetail);
        } else {
          that.setData({
            orderDetail: ''
          })
        }
      },
      complete: function () {
        wx.hideToast();
        wx.stopPullDownRefresh();
      }
    });
  },

})